Skip to content

从路径拼接图片 - ImageStitchFromPath

函数简介

从目录批量读取图片并进行拼接,可返回拼接轨迹数据。

接口名称

ImageStitchFromPath

DLL调用

int64_t ImageStitchFromPath(int64_t instance, char* path, int64_t* trajectory);

参数说明

参数名类型说明
instance长整数型OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。
path字符串图片目录(如 C:/imgs/)
trajectory长整数型指针输出参数,可为0;返回轨迹数据的字符串指针

示例

SDK 调用

cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
long handle = ola.ImageStitchFromPath("C:\\test.txt", "value");
csharp
using OLAPlug;

var ola = new OLAPlugServer();
long handle = ola.ImageStitchFromPath("C:\\test.txt", "value");
python
from OLAPlugServer import OLAPlugServer

ola = OLAPlugServer()
handle = ola.ImageStitchFromPath("C:\\test.txt", "value")
java
import com.olaplug.OLAPlugServer;

OLAPlugServer ola = new OLAPlugServer();
long handle = ola.ImageStitchFromPath("C:\\test.txt", "value");
cpp
var ola = com("OlaPlug.OlaSoft")
var handle = ola.ImageStitchFromPath("C:\\test.txt", "value")
vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
handle = ola.ImageStitchFromPath("C:\\test.txt", "value")
text
.局部变量 ola, OLAPlug
ola.创建 ()
handle = ola.ImageStitchFromPath("C:\\test.txt", "value")
aardio
import OLAPlugServer;
var ola = OLAPlugServer();
var handle = ola.ImageStitchFromPath("C:\\test.txt", "value");
text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
长整数 handle = ola.ImageStitchFromPath("C:\\test.txt", "value")
cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
long handle = ola.ImageStitchFromPath("C:\\test.txt", "value");

原生 DLL 调用

cpp
ImageStitchFromPath(instance, "C:\\test.txt", 0);
csharp
using System.Runtime.InteropServices;
using System.Text;

[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern int ImageStitchFromPath(long ola, string path, int trajectory);

ImageStitchFromPath(instance, "C:\\test.txt", 0);
python
from ctypes import CDLL, c_int, c_int64, create_string_buffer

ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
ola.ImageStitchFromPath(instance, "C:\\test.txt", 0)

返回值

长整数型:返回拼接后的图像句柄,失败返回0。

注意事项

  • 轨迹数据指针需调用 FreeStringPtr 释放内存。
  • 返回的图像需调用 FreeImagePtr 释放内存。